<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>My Order</title>
    <link rel="stylesheet" type="text/css" href="<s:url value='/CSS/order/order_list.css'/>"/>
  </head>
  <body>
    <div class="container">
      <div class="head">
        <s:include value="/WEB-INF/JSP/head.jsp"/>
      </div>
      <div class="body">
        <div class="left">
          <s:include value="/WEB-INF/JSP/order/left.jsp"/>
        </div>
        <div class="right">
          <div class="title">My Order</div>
          <table>
            <tr class="tr1">
              <td class="td1">OrderNo</td>
              <td class="td2">TotalPrice</td>
              <td class="td3">Consignee</td>
              <td class="td4">Tel</td>
              <td class="td5">Address</td>
              <td class="td6">Payment</td>
              <td class="td7">State</td>
              <td class="td8">CreatedTime</td>
            </tr>
            <s:iterator value="pagination.list" status="stat">
              <tr class="tr2" id="row_<s:property value='#stat.index'/>"
                  onmouseover="onChange('row_<s:property value='#stat.index'/>', 0)"
                  onmouseout="onChange('row_<s:property value='#stat.index'/>', 1)">
                <td class="td1"><s:property value="orderNo"/></td>
                <td class="td2"><s:property value="totalPrice"/></td>
                <td class="td3"><s:property value="realName"/></td>
                <td class="td4"><s:property value="tel"/></td>
                <td class="td5"><s:property value="address"/></td>
                <td class="td6"><s:property value="payment.getName()"/></td>
                <td class="td7"><s:property value="state.getName()"/></td>
                <td class="td8"><s:date name="createdTime" format="yyyy-MM-dd HH:mm:ss"/></td>
              </tr>
            </s:iterator>
          </table>
          <s:url action="orderAction_getOrdersByUser" namespace="/order" var="first">
            <s:param name="pageNo" value="1"/>
          </s:url>
          <s:url action="orderAction_getOrdersByUser" namespace="/order" var="previous">
            <s:param name="pageNo" value="pagination.pageNo - 1"/>
          </s:url>
          <s:url action="orderAction_getOrdersByUser" namespace="/order" var="next">
            <s:param name="pageNo" value="pagination.pageNo + 1"/>
          </s:url>
          <s:url action="orderAction_getOrdersByUser" namespace="/order" var="last">
            <s:param name="pageNo" value="pagination.lastPageNo"/>
          </s:url>
          <s:include value="/WEB-INF/JSP/pagination.jsp"/>
        </div>
      </div>
      <div class="foot">
        <s:include value="/WEB-INF/JSP/foot.jsp"/>
      </div>      
    </div>
    <script type="text/javascript" src="<s:url value='/JS/jquery-1.7.2.min.js'/>"></script>
    <script type="text/javascript" src="<s:url value='/JS/common.js'/>"></script>
  </body>
</html>